import send from './http'
export default {
  getCommodityInfo (data) {
    let req = {
      data: data,
      action: 'app.webchat.getCommodityInfo'
    }
    return send.fetch(req, 'post')
  },
  getOrderInfo (data) {
    let req = {
      data: data,
      action: 'app.webchat.getOrderInfo'
    }
    return send.fetch(req, 'post')
  },
  saveECommerceGlobalSet (data) {
    let req = {
      data: data,
      action: 'config.channel.saveEcommerceGlobalSet'
    }
    return send.fetch(req, 'post')
  },
  /**
   * 保存全局配置
   * @param data
   * @returns {*}
   */
  getECommerceGlobalSet (data) {
    let req = {
      data: data,
      action: 'config.channel.getEcommerceGlobalSetById'
    }
    return send.fetch(req, 'post')
  },
  queryEcommerceWebchatCfgById (data) {
    let req = {
      data: data,
      action: 'config.channel.queryEcommerceWebchatCfgById'
    }
    return send.fetch(req, 'post')
  },
  queryEcommerceWebchat (data) {
    let req = {
      data: data,
      action: 'config.channel.queryEcommerceWebchat'
    }
    return send.fetch(req, 'post')
  },
  addEcommerceWebchatCfg (data) {
    let req = {
      data: data,
      action: 'config.channel.addEcommerceWebchatCfg'
    }
    return send.fetch(req, 'post')
  },
  deleteEcommerceWebchatCfg (data) {
    let req = {
      data: data,
      action: 'config.channel.deleteEcommerceWebchatCfg'
    }
    return send.fetch(req, 'post')
  },
  updateEcommerceWebchatCfg (data) {
    let req = {
      data: data,
      action: 'config.channel.updateEcommerceWebchatCfg'
    }
    return send.fetch(req, 'post')
  },
  /**
   *保存在线咨询结束会话类型
   * @param data {}
   */
  newSaveDicItem (data) {
    let req = {
      data: data,
      action: 'config.channelDic.newSaveDicItem'
    }
    return send.fetch(req, 'post')
  }
}
